package edu.terapia.model;

import java.io.Serializable;

import javax.persistence.*;


/**
 * The persistent class for the tipo_persona database table.
 * 
 */
@Entity
@Table(name="tipo_persona")
@NamedQueries({
	@NamedQuery(name="TipoPersona.findAll",
			query="SELECT tp FROM TipoPersona tp ORDER BY tp.nombre")
})
public class TipoPersona implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String nombre;

	//bi-directional one-to-one association to Persona
	//@OneToOne(mappedBy="tipoPersona")
	//private Persona persona;

	public TipoPersona() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getNombre() {
		return this.nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}
	
	@Override
	public boolean equals(Object obj) {
		return (this.getId() == ((TipoPersona)obj).getId());
	}
	
/*
	public Persona getPersona() {
		return this.persona;
	}

	public void setPersona(Persona persona) {
		this.persona = persona;
	}
*/
}